args S o1 o2 o3 o4 ControlsC ControlsC_notee ControlsI ControlsNCog  ControlsGA

* all observations

spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
local MDV 0
local dp 3

local opt start
local text "prehead(\vspace{-.00cm}  \\ \multicolumn{5}{l}{\textbf{Panel A: Primarily practical skills}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "


do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o1'" "Skills_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
	"\shortstack{Construction \& \\ assembly}" ///
	"\shortstack{Using tools \\ properly}" ///
	"\shortstack{Selling products \\ or services}" ///
	"\shortstack{Looking after people \\ who need care}" 

spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
local opt appendI

local text "prehead(\vspace{.15cm} \\ \multicolumn{5}{l}{\textbf{Panel B: Primarily analytical skills}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "

do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o2'" "Skills_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
	"\shortstack{Mathematical \\ calculations}" ///
	"\shortstack{Understanding  \\ finance}" ///
	"\shortstack{Using a computer to \\ solve problems}" 

spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
local opt appendI
local text "prehead(\vspace{.15cm} \\ \multicolumn{5}{l}{\textbf{Panel C: Mixed skills}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "

do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o3'" "Skills_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
	"\shortstack{Writing \\ clearly}" ///
	"\shortstack{Speaking \\ clearly}" ///
	"\shortstack{Reading plans \\ or diagrams}" ///
	"\shortstack{Running an \\ organisation}" 

spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
local opt appendL
local text "prehead(\vspace{.15cm} \\ \multicolumn{5}{l}{\textbf{Panel D: Guiding others}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "
do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o4'" "Skills_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
	"\shortstack{Advising}" ///
	"\shortstack{Teaching}" ///
	"\shortstack{Supervising}" 




* only individuals in employmetn at 33
if `S'==1{

	preserve

	keep if AE_I33==1

	spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
	local MDV 0
	local dp 3

	local opt start
	local text "prehead(\vspace{-.00cm}  \\ \multicolumn{5}{l}{\textbf{Panel A: Primarily practical skills}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "


	do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o1'" "SkillsE_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
		"\shortstack{Construction \& \\ assembly}" ///
		"\shortstack{Using tools \\ properly}" ///
		"\shortstack{Selling products \\ or services}" ///
		"\shortstack{Looking after people \\ who need care}" 

	spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
	local opt appendI

	local text "prehead(\vspace{.15cm} \\ \multicolumn{5}{l}{\textbf{Panel B: Primarily analytical skills}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "

	do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o2'" "SkillsE_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
		"\shortstack{Mathematical \\ calculations}" ///
		"\shortstack{Understanding  \\ finance}" ///
		"\shortstack{Using a computer to \\ solve problems}" 

	spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
	local opt appendI
	local text "prehead(\vspace{.15cm} \\ \multicolumn{5}{l}{\textbf{Panel C: Mixed skills}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "

	do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o3'" "SkillsE_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
		"\shortstack{Writing \\ clearly}" ///
		"\shortstack{Speaking \\ clearly}" ///
		"\shortstack{Reading plans \\ or diagrams}" ///
		"\shortstack{Running an \\ organisation}" 

	spec `S' "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsNCog'" "`ControlsGA'"
	local opt appendL
	local text "prehead(\vspace{.15cm} \\ \multicolumn{5}{l}{\textbf{Panel D: Guiding others}} \\ \multicolumn{5}{l}{\phantom{.}} \\ \vspace{-.6cm}  \\ ) "
	do StataSubCode/OutcomeOLSkills.do "`r(Ct)'"  "`o4'" "SkillsE_`r(name)'" "`r(keepvars)'" "`opt'" "`text'" "`r(ipw)'" "`r(CreativityMeasure)'" "`MDV'" "`dp'" ///
		"\shortstack{Advising}" ///
		"\shortstack{Teaching}" ///
		"\shortstack{Supervising}" 


	restore


}
